package com.daxia.bumall.common;

/**
 * 发票类型， 0不需要，1普通发票， 2增值税发票
 * @author kevin
 *
 */
public enum InvoiceType {
	NoInvoice(0, "不需要"), 
	Normal(1, "普通发票"),
	VAT(2, "增值税发票");

	private int value;
	private String remark;

	private InvoiceType(int value, String remark) {
		this.value = value;
		this.remark = remark;
	}

	public int getValue() {
		return value;
	}

	public String getRemark() {
		return remark;
	}

	public static InvoiceType getByValue(int value) {
		for (InvoiceType o : InvoiceType.values()) {
			if (o.getValue() == value) {
				return o;
			}
		}
		return null;
	}
}
